#include<iostream>
#include<string.h>

using std::cout;
using std::endl;
using std::cin;

class Base
{
public:
    Base()
        :_y(0)
    {
    }
    Base(int a)
    :_y(a-2)
    {
        cout<<"构造"<<endl;
    }
    friend Base operator+(const Base &lhs,const Base &rhs);
    bool operator==(int a)
    {
        return _y==a;
    }

private:
    int _y;
};

     Base operator+(const Base &lhs,const Base &rhs)
{
    Base sum;
    sum._y=lhs._y+rhs._y;
    return sum;
}

int main()
{
    int i=2;
    int j=7;
    Base x(i);
    Base y(j);
    cout<<(x+y==j-i)<<endl;
}
